import React from 'react'
import { Head } from './style';
import { useHistory } from 'react-router-dom'

export default function ShoppingCartHeader(props) {
    const {deleteState,isDelete} = props
    const history = useHistory();
    const handleback = () => {
        history.go(-1)
    }
    return (
            <Head >
                <div className="leftimg " onClick={handleback}>
                </div>
                <div className='span'>购物车</div>
                <div className="Administration" onClick={deleteState} style={isDelete ? {display:'none'}:{}}>
                    管理
                </div>
                <div className="Administration" onClick={deleteState} style={isDelete ? {}:{display:'none'}}>
                    完成
                </div>
            </Head>
    )
}
